.TH std::invocable,std::regular_invocable 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::invocable,std::regular_invocable \- std::invocable,std::regular_invocable

.SH Synopsis
   Defined in header <concepts>
   template< class F, class... Args >

   concept invocable =
       requires(F&& f, Args&&... args) {                                  \fI(since C++20)\fP
           std::invoke(std::forward<F>(f), std::forward<Args>(args)...);
               /* not required to be equality-preserving */

       };
   template< class F, class... Args >                                     \fI(since C++20)\fP
   concept regular_invocable = std::invocable<F, Args...>;

   The invocable concept specifies that a callable type F can be called with a set of
   arguments Args... using the function template std::invoke.

   The regular_invocable concept adds to the invocable concept by requiring the invoke
   expression to be equality-preserving and not modify either the function object or
   the arguments.

.SH Notes

   The distinction between invocable and regular_invocable is purely semantic.

   A random number generator may satisfy invocable but cannot satisfy regular_invocable
   (comical ones excluded).

.SH See also

   is_invocable
   is_invocable_r         checks if a type can be invoked (as if by std::invoke) with
   is_nothrow_invocable   the given argument types
   is_nothrow_invocable_r \fI(class template)\fP
   \fI(C++17)\fP

.SH External links

   1.  A joke example of a random number generator that satisfies both invocable and
       regular_invocable.
